[HVM][VNC] Work around a bug in the newest version of xvncviewer which
authorSteven Smith <ssmith@xensource.com>
Tue, 26 Sep 2006 15:47:35 +0000 (16:47 +0100)
committerSteven Smith <ssmith@xensource.com>
Tue, 26 Sep 2006 15:47:35 +0000 (16:47 +0100)
could lead to the display locking up after it's been idle for a while.

Signed-off-by: Steven Smith <sos22@cam.ac.uk>
tools/ioemu/vnc.c

index 6ebd0341a968f1ccf1c208f888dfa05e9870dcca..f5581c2342c8e4ef17762ad19345fbc2eb6841b3 100644 (file)
@@ -581,12 +581,16 @@ static void _vnc_update_client(void *opaque)
               interested (e.g. minimised) it'll ignore this, and we
               can stop scanning the buffer until it sends another
               update request. */
-           /* Note that there are bugs in xvncviewer which prevent
-              this from actually working.  Leave the code in place
-              for correct clients. */
+           /* It turns out that there's a bug in realvncviewer 4.1.2
+              which means that if you send a proper null update (with
+              no update rectangles), it gets a bit out of sync and
+              never sends any further requests, regardless of whether
+              it needs one or not.  Fix this by sending a single 1x1
+              update rectangle instead. */
            vnc_write_u8(vs, 0);
            vnc_write_u8(vs, 0);
-           vnc_write_u16(vs, 0);
+           vnc_write_u16(vs, 1);
+           send_framebuffer_update(vs, 0, 0, 1, 1);
            vnc_flush(vs);
            vs->last_update_time = now;
            return;